Index: std/range.d =================================================================== --- std/range.d (revision 1824) +++ std/range.d (working copy) @@ -2549,6 +2549,7 @@ this(N current, N pastLast, S step) { enforce(step != 0 && current != pastLast); + enforce((current < pastLast) == (step > 0), "iota: incorrect startup parameters"); this.current = current; this.step = step; if (step > 0)